package com.tseacher.util;

public class StringUtil {
    public static boolean isEmpty(String s){
        return s==null||s.length()==0;
    }
    public static boolean isNotEmpty(String s){
        return s!=null&&s.length()>0;
    }
    public static boolean allIsEmpty(String[] strings){
        for(String s:strings){
            if(isNotEmpty(s)){
                return false;
            }
        }
        return true;
    }
    public static boolean allIsEmpty2(String... strings){
        return allIsEmpty(strings);
    }
    public static boolean allIsNotEmpty(String[] strings){
        for(String s:strings){
            if(isEmpty(s)){
                return false;
            }
        }
        return true;
    }
    public static boolean allIsNotEmpty2(String... strings){
        return allIsNotEmpty(strings);
    }
}
